import javax.swing.*;
import java.awt.*;

/**
 * @author Lei
 * @create 2022-05-22 16:10
 */
public abstract class View<T extends Controller> extends JFrame implements ModelListener {
    protected Library m;
    protected T c;


    public View(Library m, T c) {
        this.m = m;
        this.c = c;
        m.addListener(this);
        setBounds(300, 100, 400, 200);    //设置窗口大小和位置
        setPreferredSize(new Dimension(400, 200));
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }


    @Override
    public abstract void update();
}
